home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / dpkg / info / coreutils.preinst < prev    next >
Encoding:
Text File  |  2008-06-26  |  1.8 KB  |  43 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. # shellutils in woody contained symlinks for these items. On upgrade, dpkg 
  6. # doesn't cope well with the transition from those symlinks to the current
  7. # directories.
  8. for i in /usr/share/locale/cs /usr/share/locale/da /usr/share/locale/de /usr/share/locale/el /usr/share/locale/es /usr/share/locale/fr /usr/share/locale/gl /usr/share/locale/it /usr/share/locale/ja /usr/share/locale/ko /usr/share/locale/nl /usr/share/locale/no /usr/share/locale/pl /usr/share/locale/pt /usr/share/locale/pt_BR /usr/share/locale/ru /usr/share/locale/sk /usr/share/locale/sl /usr/share/locale/sv /usr/share/locale/zh ; do
  9.     test -L $i/LC_TIME && rm -f $i/LC_TIME
  10.     test -L $i/LC_MESSAGES/coreutils.mo && rm -f $i/LC_MESSAGES/coreutils.mo 
  11. done
  12.  
  13. # make sure old info files are cleaned up
  14. for i in sh-utils fileutils textutils ; do
  15.     if grep -qs $i /usr/info/dir /usr/share/info/dir ; then
  16.         install-info --quiet --remove /usr/share/info/$i.info
  17.     fi
  18. done
  19.  
  20. # work around stupid dpkg diversion of md5sum
  21. # get rid of this for etch+1, I don't think there's a better solution until then
  22. case "$2" in
  23. '' | 4.* | 5.?.*)
  24.     # coreutils 5.93-1 onwards do this, so we can avoid doing
  25.     # it if we know it's already been done.  That avoids trashing
  26.     # any real local diversion subsequently introduced by the sysadmin.
  27.     # (There are no coreutils versions between 5.2.1 and 5.93.)
  28.     rm -f /usr/bin/md5sum.textutils
  29.     rm -f /usr/share/man/man1/md5sum.1.gz
  30.     rm -f /usr/share/man/man1/md5sum.textutils.1.gz
  31.     dpkg-divert --remove /usr/share/man/man1/md5sum.textutils.1.gz
  32.     dpkg-divert --remove /usr/bin/md5sum.textutils
  33.     # Possibly this can be removed at some distant point, when we're
  34.     # sure that all of the systems infected with the diversion (ie,
  35.     # systems which were running the wrong version of sid, breezy or
  36.     # dapper) have been fixed.
  37.     ;;
  38. esac
  39.  
  40.  
  41.  
  42. exit 0
  43.